package com.soecode.lyf.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.soecode.lyf.dao.CollectDao;
import com.soecode.lyf.entity.Collect;
import com.soecode.lyf.service.CollectService;
@Service
public class CollectServiceimpl implements CollectService{
	
	@Autowired
	private CollectDao collectDao;
	
	@Override
	public List<Collect> selectCollection(String userid){ // 查询收藏课程列表
		return collectDao.selectCollection(userid);
	}
	@Override
	public int deleteCollection(String userid,String jcname) { // 删除收藏课程
		return collectDao.deleteCollection(userid, jcname);
	}
	@Override
	public int addCollect(String imgpath, String imgtext, String imghref, String router, String userid,String time,String jcread) {
		return collectDao.addCollect(imgpath,imgtext,imghref,router,userid,time,jcread);
	}
	@Override
	public Collect SelectCollect(String imgtext,String userid) {
		return collectDao.SelectCollect(imgtext,userid);
	}
}
